<!DOCTYPE html>

<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="icon" href="favicon.ico" type="image/x-icon" />
    
  <title>Angular Playground</title>
  <link rel="stylesheet" href="content/app.css" type="text/css" />

  <script data-main="app/config" type="text/javascript" src="scripts/require.js"></script>

  <script>
    require.config({
      paths: {
        "config": "../app-built/config"
      }
    });
    require(["config"]);
  </script>

</head>
<body ng-controller="MainController" style="display: none">
  <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          <span class="sr-only" translate>Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="https://github.com/mhinkka/angular-playground" target="_blank">Angular Playground</a>
      </div>
      <div class="navbar-collapse collapse">
        <ul ng-show="session.isAuthenticated()" class="nav navbar-nav" ng-controller="HeaderController">
          <li ng-class="{ active: isActive('/home')}"><a href="#/home" translate>Home</a></li>
          <li ng-class="{ active: isActive('/object/list')}"><a href="#/object/list" translate>Local</a></li>
        </ul>

        <ul class="nav navbar-nav navbar-right" ng-controller="HeaderController">
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" translate>Language <b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a ng-click="session.setCurrentLanguage('en_US');" translate>English</a></li>
              <li><a ng-click="session.setCurrentLanguage('fi_FI');" translate>Finnish</a></li>
            </ul>
          </li>
        </ul>

        <form ng-show="session.isAuthenticated()" class="navbar-form navbar-right" role="form" ng-submit="logoutUser()">
          <button id="SignOut" type="submit" class="btn btn-success" translate>Sign out</button>
        </form>
        <p ng-show="session.isAuthenticated()" class="navbar-text navbar-right" translate>Logged in as {{ userName }}</p>

        <form ng-hide="session.isAuthenticated()" class="navbar-form navbar-right" role="form" ng-submit="loginUser()">
          <div class="form-group">
            <input type="text" id="userName" ng-model="userName" name="userName" placeholder="{{'Email'|translate}}" class="form-control">
          </div>
          <div class="form-group">
            <input type="password" id="userPassword" ng-model="userPassword" name="userPassword" placeholder="{{'Password'|translate}}" class="form-control">
          </div>
          <button id="SignIn" type="submit" class="btn btn-success" translate>Sign in</button>
        </form>
      </div>
    </div>
  </div>

  <!-- Modal -->
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
          <h4 class="modal-title">{{modalTitleText|translate}}</h4>
        </div>
        <div class="modal-body">{{modalBodyText|translate}}</div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal" translate>Close</button>
        </div>
      </div>
    </div>
  </div>

  <div ng-view></div>
</body>
</html>
